gtktexthandle: Set css name on GtkWidgetClass
authorCarlos Garnacho <carlosg@gnome.org>
Sat, 25 Apr 2020 00:56:38 +0000 (02:56 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 12 May 2020 12:14:39 +0000 (14:14 +0200)
Handles are their own widget, special names are not necessary
anymore.

gtk/gtktexthandle.c

index fda579ca524224ca64c2e837abfef45da89c0c36..df8ea7c6381ce29a8bb53b340ddc095e298864b7 100644 (file)
@@ -348,6 +348,8 @@ gtk_text_handle_class_init (GtkTextHandleClass *klass)
                  NULL, NULL,
                   NULL,
                   G_TYPE_NONE, 0, G_TYPE_NONE);
+
+  gtk_widget_class_set_css_name (widget_class, I_("cursor-handle"));
 }
 
 static void
@@ -461,9 +463,7 @@ gtk_text_handle_new (GtkWidget *parent)
 {
   GtkTextHandle *handle;
 
-  handle = g_object_new (GTK_TYPE_TEXT_HANDLE,
-                         "css-name", I_("cursor-handle"),
-                         NULL);
+  handle = g_object_new (GTK_TYPE_TEXT_HANDLE, NULL);
   gtk_widget_set_parent (GTK_WIDGET (handle), parent);
 
   return handle;